package com.song.service.impl;

import com.song.model.Order;
import com.song.service.OrderService;
import com.song.service.ShopService;

/**
 * @ClassName : ShopServiceImpl
 * @Author : 司猫子
 * @Date: 2021/2/26 11:17
 */
public class ShopServiceImpl implements ShopService {
    private OrderService orderService;

    public void setOrderService(OrderService orderService) {
        this.orderService = orderService;
    }

    @Override
    public Order buy(Integer userId, String goodsName, Float price, Integer amount) {
        Order order = orderService.createOrder(userId, goodsName, price, amount);

        return order;
    }
}
